package com.guet.controller.user;

import com.guet.VO.StatisticsCountVO;
import com.guet.result.Result;
import com.guet.service.StatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("stuStatisticsController")
@RequestMapping("student/statistics")
@Slf4j
@CrossOrigin
public class StatisticsController {
    @Autowired
    private StatisticsService statisticsService;

    /**
     * 每个模块的内容数量
     * @return
     */
    @GetMapping("count")
    public Result<StatisticsCountVO> getStatisticsCount() {
        StatisticsCountVO statisticsCountVO = statisticsService.getStatisticsCount();
        return Result.success(statisticsCountVO);
    }
}
